<template>
  <div>
    <Life v-if="isShow" />
    <button @click="isShow = false ">销毁Life组件</button>
  </div>
</template>

<script>
import Life from '@/components/Life'
export default {
  data() {
    return {
      isShow:true
    }
  },
  components:{
    Life
  }
}
</script>

<style>

</style>